Home |
| Latest | About | Random
# Week 1 Tuesday 6/20 brief notes. (I will try to update this to the best of my abilities and memory, but alas I have only finite amount of energy...) (Also read Ch. 6.1 in the text.) ## Some motivation. We start by asking, what is calculus trying to study, if one is to give a brief one sentence summary? One answer could be: > Calculus is a set of tools to study functions (and to some effect, numbers as well). Well, why do we even care about functions? Quite often, functions are useful to model our world, whether the physical science or social science. (E.g. the temperature of a cup of coffee as a function of time; the amount of money you have in your bank account as a function of time...) **Quick remark.** Although calculus gives us this set of tools to study functions, there are some limitations. In particular calculus works well when the functions are "nice" in the calculus-sense. This means when the function is **continuous**, **differentiable**, or **integrable** (or at least **piecewise** continuous, piecewise differentiable). There are some real wild functions, like the stock prices as a function of time - - these stock price functions have some unpredictable behavior and often nowhere differentiable, so naive calculus tools are often not enough. Ok. But what sort of functions do we know so far? By now you probably have encountered the following: 1. Polynomial functions (E.g. $f(x) = x^2 + 4x - 2$) 2. Trigonometric functions (E.g. $\sin(x),\cos(x)$ and their relatives) 3. Rational powers (E.g. $f(x)=\sqrt{x}$ or $f(x)=x^{\frac{2}{5}}$) 4. Rational functions -- ratio of polynomials (E.g. $f(x)= \frac{3x^2+2x-1}{x^2 + 2}$) 5. Natural logarithm $\ln(x)$ and natural exponentiation $e^x$. Some are these functions are more "explicit" in their instruction, such as polynomial functions or rational functions. But some are more implicit. For instance the value of $\sin(0.1)$ is defined **geometrically**, either as the $y$-coordinate of the point on the unit circle whose angle with the positive $x$-axis is $0.1$ radians, or as the height of a right triangle whose hypotenuse is $1$ and the angle at the base is $0.1$ radians. But what about the **natural logarithm** and the **natural exponentiation function**? You might have learned that they are **inverse** of each other, that $$ \ln(e^x) = x \quad \text{ for all real $x$} $$and $$ e^{\ln{x}} = x \quad\text{ for x > 0.} $$ And perhaps, you may even have learned of their graphs. But how exactly do we **define** them? As we will see later this week, we can define them using **calculus** and the idea of **inverse** functions. Though before we do this, let us take a slight detour of the history of where these came about. ## "Story" of logarithm. ("Story" in quotes since it is roughly the story...) The first "published development" of the logarithm is largely attributed to John Napier in c.a.1600s. Back then, the cutting edge mathematical technology was trigonometry (at least in the west). Trigonometry was immensely useful in navigation and astronomy. As people carried out a lot of calculations, they realized they needed to do a lot of **multiplications**. But multiplication (though not impossible) can be **tedious**, so they looked for ways to do multiplication "faster" but perhaps at the trade-off of "accuracy". And in fact there was a method using trigonometry to do "multiplication" called **prosthaphaeresis**, c.a. 1500s, using angle-sum formula, in particular $\cos(a)\cos(b)= \frac{1}{2}[\cos(a+b)+\cos(a-b)]$. Notice here the multiplication of two cosines is the same as performing the sum of two cosines (and then halving). In essence, we turned a multiplication problem into an addition problem. Napier looked for another way to do fast multiplication (also by turning multiplication into an addition problem), with the trade-off of accuracy. Here is Napier's method. We will illustrate how to perform $0.742 \times 0.512$, a product of two numbers each less than 1 : 1. Pick a number $\gamma$ less than 1, but really close to 1, say $\gamma = 0.999$. 2. Tabulate a table of the powers of $\gamma$, as $(N,\gamma^N)$, so it looks something like this: $$ \begin{matrix} N & \gamma^N \\ 1 & 0.999 \\ 2 & 0.998001 \\ \vdots \end{matrix} $$ This table can be pre-computed. Napier compiled a giant table using a number even closer to 1. 3. Now, we notice that the column of values $\gamma^N$ decreases as we go down, since we are multiplying a number less than 1 each time. So at some point it will get down **roughly** $0.742$ and $0.512$. So read off the corresponding $N$ values for those entries:$$ \begin{matrix} N & \gamma^N \\ 1 & 0.999 \\ 2 & 0.998001 \\ \vdots \\ 298 & 0.742190...\approx0.742 \\ \vdots \\ 669 & 0.512049...\approx0.512 \\ \vdots \\ 967 & 0.3800... \end{matrix} $$ 4. Here we find the $N$ values are $298$ and $669$. Now, add these $N$ values together to find a new $N$ value, which is $298+669 = 967$. Addition is in general much easier than multiplication! 5. Finally, find the row with $N=967$, and the corresponding $\gamma^N = 0.3800...$. This is approximately the product! Indeed, if you use a calculator, $0.742 \times 0.512 = 0.379904$. Why does this work? If we write the numbers $a = \gamma^{N_1}$ and $b = \gamma^{N_2}$, then their product is $$ ab=\gamma^{N_1} \gamma^{N_2} = \gamma^{N_1 + N_2} $$ So we should find their corresponding "$N$" values, and then add them up! In particular, if $x=\gamma^N$, then this magical $N$ is given by $N=\log_\gamma x$, an instance of logarithm. Napier published this method, and associated ideas, in his 1614 book **Mirifici Logarithmorum Canonis Descriptio** Check out [wikipedia page: Description of the Wonderful Canon of Logarithms](https://en.wikipedia.org/wiki/Mirifici_Logarithmorum_Canonis_Descriptio). Shortly after Napier's work, around 1620 or so, people invented and used [slide rules](https://en.wikipedia.org/wiki/Slide_rule), based on the principle of logarithms, to perform multiplication! At least, up until the advent of digital computers which dethroned the slide rule in the mid 1900s. ## "Story" of natural exponentiation. Jacob Bernoulli in around 1600s wanted to study the problem of **compound interest**. Suppose you are a bank that loaned someone 100 dollars, at an interest rate of 12% per year. That is, after one year, they will pay you back 100 dollars plus the 12% of the principle amount, for a total of 112 dollars. Schematically $$ 100\stackrel{\text{1 year}}{\to}100(1+0.12)=112 $$Now what if we change this loan structure as follows: Charge interest **twice** a year, i.e. every 6 months, but only at 6% each time they owe up to that point, so $$ 100\stackrel{\text{6 mo.}}{\to} 100(1+0.06) \stackrel{\text{6 mo.}}{\to} 100(1+0.06)^2= 112.36 $$Hmm! You might observe that you would get more money this way! Ok, how about we charge interest 12 times a year, e.g. every month, but only at 1% each time, so $$ \begin{align*} 100\stackrel{\text{1 mo.}}{\to} 100(1+0.01)\stackrel{\text{1 mo.}}{\to}100(1+0.01)^2\stackrel{\text{1 mo.}}{\to}\cdots \\ \cdots\stackrel{\text{1 mo.}}{\to} 100(1+0.01)^{12}=112.683 \end{align*} $$ Now this is exciting, it seems like we are getting more money at the end, if we were to collect more often but at a corresponding fraction of the original interest rate! So the question now is, if we do it even more times, what would eventually happen? Does it stabilize? Or does it blow up to infinity (to which we'd have infinite money!)? Phrasing this mathematically, if we denote $P$ as the principal amount of money, and $r$ as the interest rate over a set time period, we want to know what happens to $$ P\cdot\left( 1+ \frac{r}{N} \right)^N \to ??? $$ as $N\to\infty$. As it turns out, it stabilizes to a fixed quantity, in particular we have > $$ \lim_{N\to\infty} \left( 1+ \frac{r}{N} \right)^N = e^r $$ where $e\approx 2.71828...$, and in particular > $$ \lim_{N\to\infty}\left( 1 + \frac{1}{N} \right)^N = e $$ We shall establish these facts later. Okay. Right now we should be itching to figure out how might we define these natural logarithm or natural exponentiation functions. Since they are inverses of each other, we shall start by studying inverse functions. ## Inverse functions. (6.1) Given a function $f(x)$, its inverse, if exists, is another function $f^{-1}(x)$ that "undo" the action of $f$. That is to say, if $f(a) = b$, then we ought to have $f^{-1}(b)=a$. But there are some complications. If the function $f$ is not one-to-one on its domain, then we cannot define a suitable inverse for $f$. For example, if $f(3)=1$ and $f(5)=1$, we wouldn't know what should we assign to $f^{-1}(1)$. In other words, > We can define an inverse $f^{-1}$ to the function $f$ when $f$ is one-to-one. In this case, the domain of $f^{-1}$ is the range of $f$. Here, by **one-to-one** we mean the following: > A function $f(x)$ is one-to-one on its domain $D$ if whenever two inputs $x\neq y$ are different, then their outputs are also different: $f(x) \neq f(y)$. Graphically, this means a function $f$ is one-to-one if and only if the graph of $f$ pass the **horizontal line test**, that is: every horizontal line meets the graph of $f$ at most once. Continuing on this note, the graphs of $f$ and its inverse $f^{-1}$ (if exists) are also related. In particular their graphs are **reflections of each other** arcoss the $45^\circ$ line, $y=x$. This is because if $(a,b)$ is a point on the graph of $f$, then $f(a)=b$, then $f^{-1}(b) = a$, then $(b,a)$ is on the graph of $f^{-1}$. This also provides an algebraic way of "finding the inverse to a function", by "switching $x$ with $y$" and solve for $y$. However, this isn't always helpful. Furthermore, if we cannot really graph the function, how might we tell whether a function is one-to-one? This is where calculus come to the rescue. ## Continuity and one-to-one-ness. Calculus can help us deal with "nice" calculus functions. We start with continuity: > **Theorem.** > Let $f$ be a continuous function on an interval $I$. Then $f$ is one-to-one if and only if $f$ is either strictly increasing, or strictly decreasing, on the interval $I$. It is not too bad to see that if $f$ is strictly increasing or strictly decreasing, then $f$ is one-to-one. (Try to do this). To show the other direction, I will sketch out parts of the proof: Suppose $f$ is continuous on an interval $I$, and that $f$ is one-to-one. We like to show $f$ is strictly increasing or strictly decreasing. We will argue by contradiction. Suppose to the contrary, that $f$ is neither strictly increasing nor strictly decreasing, then we have two possibilities: (1) there exists three points $a < b < c$ in the interval $I$ such that $f(a) < f(b) > f(c)$. (2) there exists three points $a < b < c$ in the interval $I$ such that $f(a) > f(b) < f(c)$. In case (1), we further have three possibilities: (1a) $f(a) < f(c) < f(b)$ (1b) $f(c) < f(a) < f(b)$ (1c) $f(a)=f(c) < f(b)$ Note (1c) cannot happen, since we assumed $f$ is one-to-one. I will show (1a) also cannot happen, and leave you to show (1b) cannot happen. Since $f$ is continuous on the interval $[a,b]$, by **intermediate value theorem** every $y$ value between $f(a)$ and $f(b)$ is achieved somewhere in the interval $[a,b]$. This means for the $y$ value $y=f(c)$, which is between $f(a)$ and $f(b)$, we can find some $x \in[a,b]$ such that $f(x) = y$. But this means $f(x)=f(c)$. Since $x \le b < c$, we know the inputs $x\neq c$. So this implies $f$ is **not** one-to-one, a contradiction! So case (1a) cannot happen! We can similarly work out case (1c), as well as all the cases in (2), to show they are all impossible. Hence a continuous one-to-one function $f$ on an interval must be strictly increasing or strictly decreasing! $\blacksquare$ The next question is, do we have some tools to tell whether a function is strictly increasing or strictly decreasing? We further exploit calculus to help us. ## Differentiability and one-to-one-ness. Indeed, if the function is differentiable, then looking at the sign of the first derivative would help determine increasing or decreasing: > **Theorem.** > Let $f$ be a **differentiable** function on an interval $I$. > If $f'(x) > 0$ for all $x\in I$, then $f$ is strictly increasing on $I$. > If $f'(x) < 0$ for all $x\in I$, then $f$ is strictly decreasing on $I$. In fact, we can say something even stronger, allowing some possibility of zero derivatives: > **Theorem.** > Let $f$ be a differentiable function on an interval $I$. Then $f$ is strictly increasing or strictly decreasing if and only if we have both of the following > (1) $f'(x) \ge 0$ for all $x\in I$ **or** $f'(x)\le 0$ for all $x\in I$; **and** > (2) The set of points $Z$ where $f'(x)=0$ do not contain any intervals. For example, the function $f:\mathbb{R}\to\mathbb{R}$ given by $f(x)=x+\cos(x)$ has derivative $f'(x) = 1 - \sin(x)$ for all $x$. Since $\sin(x)$ take on the values between $[-1,1]$, we see that $f'(x)$ take on the values in $[0,2]$, which means $f'(x) \ge 0$ for all $x$. This is promising but we should check the set $Z$ where $f'(x)=0$. In this case, $f'(x)=1-\sin(x)=0$ when $\sin(x)=1$, namely $x= \frac{\pi}{2} + 2\pi N$, for all integers $N$. So $Z=\left\{ \frac{\pi}{2}+2\pi N: \text{for all integers } N \right\} = \left\{..., \frac{\pi}{2},\frac{5 \pi}{2},\frac{9 \pi}{2},... \right\}$, which is a collection of discrete points and thus contain no interval. Hence we can safely conclude, using the theorem above, that $f(x)$ is strictly increasing. (And hence also one-to-one, and hence also have an inverse!) (the story continues tomorrow.) ## Addendum. To remind you, this is the statement of **intermediate value theorem**: > **Theorem. Intermediate value theorem.** > Let $f(x)$ be a continuous function on the interval $[a,b]$. Suppose $f(a)\neq f(b)$, then for any value $y$ between $f(a)$ and $f(b)$, we can find some point $x \in [a,b]$ such that $f(x) = y$. ///